package org.zf.database.domain;

import lombok.*;

import java.io.Serializable;

/**
 * 表描述信息
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
public class TableInfo implements Serializable
{
    private DBInfo dbInfo;
    private String tableName;
    private Boolean isTable = true;
    private String comment;
    private int rowSize;
    private long dataSize;
    private long indexSize;

    public TableInfo(DBInfo dbInfo, String tableName)
    {
        this.dbInfo = dbInfo;
        this.tableName = tableName;
    }

    public TableInfo(DBInfo dbInfo, String tableName, Boolean isTable, String comment)
    {
        this.dbInfo = dbInfo;
        this.tableName = tableName;
        this.isTable = isTable;
        this.comment = comment;
    }
}
